<?php


namespace app\api\controller\xilumarket;


use app\common\controller\Api;
use app\common\model\xilumarket\RecoveryCategory AS RecoveryCategoryModel;

/**
 * 回收分类
 * @package app\api\controller\xilumarket
 */
class RecoveryCategory extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function lists(){
        $lists = RecoveryCategoryModel::field("id,name")->with(['children'=>function($query){
            $query->field(['id','name','pid']);
        }])->order('weigh','desc')->select();
        $this->success("查询成功",$lists);
    }


}